perm filename DEBUG.LOG[MF,DEK]13 blob sn#605198 filedate 1981-08-07 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00010 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	*** The Log of METAFONT Bugs ****
C00007 00003	* December 18 (1978)
C00009 00004	* December 26
C00012 00005	* December 27
C00015 00006	* April 11 (1979)
C00017 00007	* April 14
C00021 00008	* June 27 (Changes and extensions made while writing the manual)
C00027 00009	* July 25 (Now METAFONT is on the system for use by readers of draft manual)
C00030 00010	* January 28, 1980
C00034 ENDMK
C⊗;
*** The Log of METAFONT Bugs ****

This file contains notes about essentially all the changes made to METAFONT since
MFNTRP first compiled without syntax errors in December, 1978.

Unlike TEX, which was completely written first, METAFONT was created in three
distinct stages (MFNTRP, MFRAST, MFOUT), since each was almost completely
independent of the others and each used a somewhat different type of intuition.

Each change has been classified into one of the following twelve categories:

B, a blunder or slip (I knew what I wanted to do, but I wrote something else
	that was syntactically correct; sort of a mental typo).
D, an incorrect update to the data structures (I failed to fill in some fields
	according to the rules).
E, an improvement made for the sake of efficiency (although the inefficient
	version would have run correctly).
F, a forgotten case or operation (where the program is supposed to do more things or
	handle more cases than I had remembered to code when I wrote that part).
G, a change that adds to the generality of TEX (usually an extension that suddenly
	became desirable, but sometimes merely a change in syntactic sugar).
I, an improvement to the interactive use of TEX (including error messages and
	error recovery as well as diagnostic aids for myself).
L, a change necessary because of my misuse or misunderstanding of the
	SAIL language or the DEC10 hardware.
M, a mismatch between some procedure and its call (different conventions being
	assumed in different places).
P, an improvement to the program organization or documentation, not visible
	to the user.
R, added robustness (error recovery that is mandatory to keep the program
	from looping or crashing).
S, an unpleasant surprise that made me change the original idea of some
	algorithm or data structure.
T, a typographical error (made while entering the program into the machine,
	not caught as a syntax error).

Categories B, D, F, L, M, R, S, T are "bugs", while categories E, G, I, P are
enhancements to the language and conveniences for its users.

Besides these classifications, each change also has a serial number. For example,
M64 is change number 64, and it belongs to category M (mismatch). Some changes
are directly related to previous ones; this is indicated by a notation like
"F100→97", which means that change 100 is of category F and that it wouldn't have
been necessary if change 97 had been done correctly.

Some of the errors were of course more devastating than others; some of the
changes were far-reaching, others were just minor twiddles. Several actual
changes might correspond to a single entry in this log, since a single
type of error or extension may be reflected in many parts of the code.

Comments are sprinkled in with the list of changes, to record some of the
milieu in which debugging took place.
* December 18 (1978)
S1	Added type `newid' for newly declared identifier (replacing earlier double
		use of `independent'
E2	Combined type `ignore' with type `space'
F3	Forgot the case of a constant starting with "."
L4	Code for "pause" didn't come through scanner; Found out that SAIL
		normalizes y in x←y, even when both x and y are real
B5	[contrl] should go to finstmt
* December 23
B6	Had "uinfo(qq)" instead of "uinfo(s)" in simplify routine
I7	Added cosmetic space around idname in dumpdlist
I8	Deleted ugly punctuation after new equation report
D9	In idname on long names, must zero out t, not just rotate it
F10	In dumplist, was "too robust", had wrong test of improper chr field
B11	End of subroutine should go to beginstmt
B12	For subroutine parameters I need getnext not gettok
F13	Forgot to set forcednew
S14	Besides varparam and indexparam, also need `param'
B15	I said `done' when I meant `continue' inside and if test
S16	Must take parameter names out of the hash table lists after a subroutine
		is stored: `idhide' is written
S17→13	`forcednew' logic was faulty
B18	In wxylookup I said "w" mod '37 when I meant "w" land '37(!)
* December 26
D19	wvar list wasn't initialized properly
G20	"new" should allow wxy variables, and initialize the type to newid
G21	Revised syntax of unary operators: put them under primary, not expression
F22	Forget "done" in idname loop
L23	Missing ";" after a comment caused a very mysterious bug
I24	Tuned the error message for "end occurred in ..."
S25	In idname, xxxxxxxx should be omitted if length is short
B26	getnext not needed after getexp in "cawl" routine
I27	Undefined expression should print out the expression
I28	Long name case of idname should end "X" not xxxxxxxx...
R29	dumpdlist must be more robust
F30	neweq forgot to store initial vmem of dependent variable
I31	"Leaving..." message added
L32	Relations were not properly mapped into a case expression
F33	≡ was not treated as equals
S34	Skipped conditional test should use getnext
B35	Skipped conditional should go to finstmt, not endstmt
F36	Omitted getnext in call "z"
F37	Omitted getnext in [direction]<primary>
I38	Improved wording of error message in checkscalar
G39	Will allow <exp> ddraw as well as <exp> draw
L40	Error in simplify routine when trying to compare packed data
I41	Should show the indeterminate relation
F42	Forgot nextline before ⊗⊗⊗⊗⊗⊗ in printout
I43	Took out four space in drawit printout
D44	Needed to initialize curpen, cursize
R45	Bounds on vmem exceeded in searchmem procedure
I46	Decided to print out `oneused' and `twoused' periodically
I47	Format (8,2) should be (10,2)
F48	The "new" routine forgot to fix up vmem
* December 27
B49	In dsvalue, another list-processing bug, had q instead of mem[q]
B50	In mfparam, another list-processing bug, had vmem[t] instead of t
D51	dsvalue allocated too small a node
I51	Improved error message on missing = sign (shows the value)
I52	Display of `linear pen growth' had wrong spacing
* Increased the size of the input stacks
B53	"no" went to finstmt instead of endstmt; oft-repeated bug
I54	Added conditional drawtrace
I55	draw should state the current pen type when tracing
I56	Pagewarning message should have quotes at title time, not when error sensed
B57	"flush" should go to endstmt, not beginstmt
* December 31
B58	Said curchar when I meant curtype, in scanpath
I59	Changed pointw[0] to pointw[1] when point not there (printout looks better)
G60	Changed scanpath so that cursize is not affected
I61	Better wording of "Paths don't have corresponding points" error
I62	"if", "draw", "ddraw", "round", etc. should be followed by space in printout
I63	Undefined pen size should display it
G64	Expression syntax reformulated again, after considering 2 round x y + z
B65→64	(This introduced an error, getnext called by mistake)
D66	ddrawit doesn't position indices correctly
I67	Negative pen width error, should say what it is
I68	Improved error recovery after "You can't start expression like this"
S69	"stop" after flush wasn't handled right
* January 1 Test program now works, checking to see memory deallocated properly
F70	Had forgot to deallocate the node for α in α[ , ] expressions
* Now everything seems in good shape, but MFRAST and MFOUT not written.
* Happy New Year!
* April 11 (1979)
* [Now MFRAST has been coded. A few details of MFNTRP changed in the meantime.]
T71	Had ≤ for ≥
B72	Mistake in mental arithmetic when setting xpenmin, though 108≡18 mod 36
G73	The setw0 routine should round, not truncate
T74	fsin formula had a typo, x for y
D75	fullrastplot increased xy when the applypen macro already increased it
S76	Single point plot gave a curve with the "Degenerate" message
B77	tt[m]←1.0 in splitting routine, should be 0.0
B78	Said curpen when I meant curploc
F79	Forgot to decrease ycount in the loop
T80	xl≤xr not xl≥xr in makeovalpen xmax computation
* April 13
I81	"display" is a bad name for dump control
I82	Typout on the sharp turn message should use cvf
B83	xy not properly set when vrastplot was modified
S84	ddoutrast j control didn't separate mod 9 from mod 8
D85	Had the wrong formula for xw in vrastplot and fullrastplot
F86	Forgot to update xw in the loop of fullrastplot
L87	Had to increase size of rast to avoid overflow at top, even though it
		will always be zero
B88	octant=6 had signs fouled up ([5]↔[6])
D89	y negative stored in partial field in storepen
* April 14
I90	Datadisc routines now use the "page printer"
I91	trdraw should start a new line at the beginning of spdraw
B92	Changed yytr to tryy (since reserved word can't start with y)
S93	yhigh not computed correctly in fullrastplot, it needs to be in the loop
L94	"if ... then 0 else .5" caused problem because of type coercion!
B95	Assignments in wrong order when spdrawing a horizontal line
I96	`statement' ← `command' in error messages
F97	clearrast should also clear the dd buffer
R98	Need to check nonnegativity before taking square root in ctp2
F99	Omitted sqrt in calculation of ccubics
G100	Changed erasers so that they are twice as wide and have no x correction
F101	makeers forgot to set the penl and penr arrays!
B102	Misplaced "end" in filldraw
B103	wd and dg clobbered in ddrawit
B104	Need to divide d by the distance in filldraw
L105	Bug caused by the fact that SAIL treats "(x←25)=(x=10)" as true
I106	Proof file should get .TEX extension
I107	Will save the file name so user can be prompted after execution is complete
S108	Incorrect initialization of traversal control in makeproof
T109	y0-3 not y0+3 in makeproof
R110	makeproof routine should ignore points that are out of range
R111	Should force lower case in a subroutine's identifying prefix letter
F112	finishchar should call makeproof
* April 27
D113	Page number count was wrong if a file began with an empty page
F114	Forgot to clear symbol table after outputting a character
* April 28
G115	Moved point labels closer to points on proofmode output
B116→99	Another serious typo in ccubics, caused by misreading nested parentheses
* June 20
D117	clearpens incorrectly set an entry shifted by infod not hw
D118	Insertion into doubly linked list in setuppen had wrong pointer variable
F119	"draw 1" didn't apply the transformation parameters
F120	Neither did entersym
* June 22
G121→100 Changed "lft" and "rt" for lers and rers
G122	Added epen
* June 27 (Changes and extensions made while writing the manual)
G123	Deleted pointlin stuff and the "--" feature, it seems unnecessary
G124	Deleted the linear case of ccubics
G125	Made the definition of <primary> more consistent (now it's <dir><term>,
		not <dir><primary>)
G126	Restriction that α must be known in α[u,v] is removed
I127	Changed some reserved words for consistency
I128	Removed the "Degenerate curve" error
I129	Separated two kinds of "drawtrace"
F130	[penname] in the interpreter should reset current pen size
G131	Inserted charclear routine in MFOUT to handle default settings
* July 1
F132	Have to watch the integer w0 if "new w0" appears
I133	(no) pagewarning mode inserted
* July 5
B134→111 Blank was forced to "lower case letter" on subroutine call
G135	Character constants introduced
* July 6
D136	Error recovery insertion forgot to update the "recovery" variable
* July 7 (A lot of code added today, to complete MFOUT and parts of the interpreter)
* July 8
I137→127 Changed "antmode" back to "crsmode"
R138	"Ligature/kern table didn't end properly" error added
F139	Forgot to multiply x coordinates of epens
G140	Made epen x coordinate multiplier independent of the y multiplier
F141	Forgot to change y in a loop on y (makechr)
F142	Forgot to call tfxinit at beginning of maketfx
B143	openofil had "if ochan[]" instead of "if ochan[]≥0"
F144	Preamble was not written at the beginning of an .ANT file
B145	Alphatype codes were inserted backwards
I146	Omit periods in the messages printed by closeout
G147	Improved syntax of ligature/kern routines
G148	Simplified the tfx conventions
B149	Said "curchar" when I meant "curtype" in lig routine
D150	Incorrect processing of charlist entry ending with 0
I151	Changed `drawing' to `image' in error message
F152	Forgot to call makefnt
E153	Speedup possible in makefnt if xr=xl
D154	makefnt must set ch←openofil sooner
B155	leftkern ← -xlb not -xl
D156	If xlb decreases, need to update xl and lz
S157	Disk blocks are '200 long, not '400
I158	Should increase system pushdown-list allocation when debugging
* July 9
R159	Should prevent user from writing on another's area: "ofilarea" disappears
B160	Incorrect conversion of font title substrings ([5i] should be [5i-4])
D161	Font height and baseline interchanged in .FNT file output
S162	Height came out one too low, baseline one too high
L163	Kern entries no properly relocated, since sign not masked off during test
R164	Modified .TFX file format to add the ACCTIM of creation
G165	Added extraspace parameter in roman fonts
* July 11
F166	entersym forgot to check if the mate was known
* July 12
G167	Added "hidden" command to help in positioning labels
* July 14
G168→167 `hidden' renamed `invisible'
I169	Decided to allow spen and epen with blank specs
* July 25 (Now METAFONT is on the system for use by readers of draft manual)
R170	An insertion following an end-of-file error didn't work
S171	= was disambiguated in gettok, it should have been in getnext
* July 28
F172	Forgot "popinput" after leaving a subroutine (an amazingly long-lived bug)
I173	Made errors.tmp file free of lonely line-feeds
* August 18
D174→156 Incorrect fix to lz when chardw<xlb
* August 24 (While preparing the public version of the user manual)
I175	Double x to exit will save embarrassing early termination
G176	Symmetry between erasers and pens: lers and rers become lpen and rpen
G177→132 hpenht and vpenwd replace w0
I178	Improved some error messages (e.g. `pen width' → `pen size')
F179	Forgot commas in the filename scanner
S180	Removed conflict between epen and spen
I181	Default dumplength changed from 500 to 1000
* August 27
S182	Need to clear the parameter values when recovering from an error in a call
S183	Proof mode labels in case 5 were too far to the right
I184	Dumplist should omit spaces on times or division
* October 15
B185→176 Second call to getnext was outside the conditional on spen scanner
S186	Changing the width of an spen or epen caused the "This can't happen" error
S187	penadj routine didn't always have spen or epen corrections set up
* October 31
D188	Sharp turn error on ddraw always gives point names of first path
I189	⊗⊗⊗ in trace output would look better as ### on non-Stanford system
G190→177 lpenht and rpenht to be independent of hpenht
S191	input should be skipped over during conditional text
* January 28, 1980
* Correcting problems noticed during November and December font development
F192→176 eraserness of a pen must be restored after subroutine call
F193	spen and epen specifications not reset unless necessary
I194	penreset effective at period closing a main routine too
G195	crsbreak should append to a list of break positions
F196	proofmode dots should be confined to same rectangle as labels
F197	makeepen needs to check the pen bounds

* February 9
G198	added "no points" option in proof mode
I199	when debugging METAFONT it will show the pen memory allocation status

* February 19
B200	incorrect rounding when plotting one point with lpen or rpen

* March 1
B201	Alphatype broken characters should be at multiples of 10 and y not so low

* March 31
I202	sqrt of negative should get MF error message not a SAIL one
T203	definition of pmin said -xrastmin not -xrastmax
T204→195	≥ instead of > in "too tall" error

* July 8
I205	crsmode tries to choose as small a number of offsets as possible

* July 24
G206	added temporary binput to allow input of Tung's Chinese characters in binary

* November 28
R207	need to check that pen size ≥1 in ddraw
G208	added provision to flag characters that should be set left-to-right on CRS

* December 2
G209	major extensions by Lyle Ramshaw for Xerox-oriented fonts, also tfx→tfm.

* December 13
I210→209 title parameters are changed to upper case
I211	Alphatype routines changed to load module instead of source file

* December 19
B212	used the variable k before it was defined in hrastplot!

* February 12, 1981
S213	constant .999 changed to .99999 in ccubics

* April 10
L214	problem in "useto" and "wordout" in the I/O routines causes clobberage

* May 17
G215	extensions to Alphatype output (break both x and y, new ANT format)

* May 23
S216	certain cases of Alphatype encoding did not quite close the cycle

* August 4
S217	after "x" to exit an error, another error could occur in tfmmode
I218	error conventions made compatible with TEX, without control characters
I219	nonstop mode added for batch processing

* August 7
I220	if pmem nearly full, it is automatically cleared out to avoid overflow